package api

import (
	"django_blog_gin/internal/svc"

	"github.com/gin-gonic/gin"
)

type categoryHandler struct {
	GetCategoryList gin.HandlerFunc
	CreateCategory  gin.HandlerFunc
	GetAllCategory  gin.HandlerFunc
	UpdateCategory  gin.HandlerFunc
}

func NewCategoryHandler(svcCtx *svc.ServiceContext) *categoryHandler {
	ctr := NewCategoryApi(svcCtx)
	return &categoryHandler{
		GetCategoryList: ctr.GetCategoryList,
		CreateCategory:  ctr.CreateCategory,
		GetAllCategory:  ctr.GetAllCategory,
		UpdateCategory:  ctr.updateCategory,
	}
}
